package com.xunai.saas.example.service.impl;

import com.xunai.saas.example.model.enums.TongueEnum;
import com.xunai.saas.example.model.param.TongueAnalysisParam;
import com.xunai.saas.example.service.TongueService;
import com.xunai.saas.example.utils.HttpClientUtils;
import org.springframework.stereotype.Service;

/***
 * @author admin
 */
@Service
public class TongueServiceImpl extends HttpClientUtils implements TongueService {
    @Override
    public String tongueAnalysis(TongueAnalysisParam tongueAnalysisParam) {
        return sendPost(TongueEnum.TONGUE.getUrl(), tongueAnalysisParam);
    }

    @Override
    public String queryResult(String notifyCode) {
        String url = String.format(TongueEnum.TONGUE_QUERY_RESULT.getUrl(), notifyCode);
        return sendGet(url);
    }
}
